package com.sunshine.order.server.controller;

import com.sunshine.order.server.config.PersonConfig;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author WeiHong
 * @date 2019/8/8 15:58
 */
@RestController
@RequestMapping("person")
public class PersonController {
    @Resource
    private PersonConfig personConfig;

    @GetMapping("print")
    public String print() {
        return "name:" + personConfig.getName() + " age:" + personConfig.getAge();
    }
}
